<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="*|/"><xsl:apply-templates/></xsl:template>

<xsl:template match="text()|@*"><xsl:value-of select="."/></xsl:template>

<xsl:template match='nbsp' name='nbsp'>
<xsl:text disable-output-escaping='yes'>&amp;nbsp;</xsl:text>
</xsl:template>

<xsl:template name="lf2br">
 <xsl:param name="text"/>
 <xsl:choose>
   <xsl:when test="contains($text,'&#10;')">
     <xsl:value-of select="substring-before($text,'&#10;')"/>
     <br/>
     <xsl:call-template name="lf2br">
       <xsl:with-param name="text">
         <xsl:value-of select="substring-after($text,'&#10;')"/>
       </xsl:with-param>
     </xsl:call-template>
   </xsl:when>
   <xsl:otherwise>
     <xsl:value-of select="$text"/>
   </xsl:otherwise>
 </xsl:choose>
</xsl:template>

<xsl:template match="venue">
  
  <div style="background:#EC2C29;margin-bottom:10px; width:100%;" class="round_me">
    <div style="padding-bottom:15px;padding-top:15px;padding-left:10px;">
      <div style="float:left;">
        <input style="font-size:.8em;margin-top:20px;" type="button" value="Crea un evento qui" onclick="window.location='/activities/activitycreate.aspx?lid={@lid}'"></input>
      </div>
      <div class="galleryTitle" style="padding-left:140px;padding-top:5px;">
        <a target="_blank" style="text-decoration:none; color:black;" href="/locali/localeShow.aspx?lid={@lid}" id="venue">
          <xsl:value-of select="@name"/>
        </a>
      </div>
      <div class="body" style="padding-left:140px;text-transform: capitalize;">
        <xsl:value-of select="@address"/>, <xsl:value-of select="@nr"/>
      </div>
      <div class="body" style="padding-left:140px;text-transform: capitalize;">
        <xsl:value-of select="@zip"/> - <xsl:value-of select="@city"/> (<xsl:value-of select="@isocountry"/>)
      </div>
      <div class="body" style="padding-left:140px;padding-top:5px;">
        <a target="_blank" style="text-decoration:underline;" href="/gmap.aspx?type=NORMAL&amp;longitude={@longitude}&amp;latitude={@latitude}&amp;name={@name}&amp;address={@address}&amp;nr={@nr}&amp;zip={@zip}&amp;city={@cityname}&amp;country={@isocountry}" id="testmappa">
          mappa
        </a>,&#160;
        <a target="_blank" style="text-decoration:underline;" href="/gmap.aspx?longitude={@longitude}&amp;latitude={@latitude}&amp;name={@name}&amp;address={@address}&amp;nr={@nr}&amp;zip={@zip}&amp;city={@cityname}&amp;country={@isocountry}">vista satellitare</a>
      </div>
    </div>
    <hr width="75%" />
    <div style="padding:10px;">
      <xsl:value-of select="@content" disable-output-escaping="yes"/>
    </div>
  </div>
  
</xsl:template>

</xsl:stylesheet>